package com.zhongwang.mms.module.basic.dao;

import com.zhongwang.mms.gen.entity.MMaterialDictionary;
import com.zhongwang.mms.gen.entity.MMaterialDictionaryExample;
import com.zhongwang.mms.module.basic.model.MMaterialDictionaryModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface MMaterialDictionaryDao {
    long countByExample(MMaterialDictionaryExample example);

    int deleteByExample(MMaterialDictionaryExample example);

    int deleteByPrimaryKey(Integer mdId);

    int insert(MMaterialDictionary record);

    int insertSelective(MMaterialDictionary record);

    List<MMaterialDictionary> selectByExample(MMaterialDictionaryExample example);

    MMaterialDictionary selectByPrimaryKey(Integer mdId);

    int updateByExampleSelective(@Param("record") MMaterialDictionary record, @Param("example") MMaterialDictionaryExample example);

    int updateByExample(@Param("record") MMaterialDictionary record, @Param("example") MMaterialDictionaryExample example);

    int updateByPrimaryKeySelective(MMaterialDictionary record);

    int updateByPrimaryKey(MMaterialDictionary record);

    /*--myself--*/

    /**
     * 根据条件查询物料数据字典
     *
     * @param materialDictionary 查询条件
     * @return 原料数据字典列表
     */
    List<MMaterialDictionaryModel> findMaterialDictionaryByQuery(MMaterialDictionary materialDictionary);

    /**
     * 根据条件查询物料数据字典
     *
     * @param materialDictionary 查询条件
     * @return 原料数据字典列表
     */
    List<MMaterialDictionary> existMaterialDictionaryByQuery(MMaterialDictionary materialDictionary);

}